package org.nf.site.api;

import org.nf.web.annotation.RequestMapping;
import org.nf.web.servlet.View;
import org.nf.web.servlet.view.JsonView;
import util.HttpClientUtils;

import java.util.HashMap;
import java.util.Map;

/**
 * 产品HttpClient接口
 */
public class ProductController {
    @RequestMapping("/doListProduct")
    public View doGet() {
        Map<String, String> map = new HashMap<>();

        map.put("name", "user1");
        String result = HttpClientUtils.sendGet("http://localhost:8080/listProduct", map);
        return new JsonView(result);
    }

}
